<?php

$cars = array("Volvo","BMW","Ioyota");
echo $cars[1];
$cary[2] = "Audi";


echo "<pre>";
print_r($cars);
echo count($cars);
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
echo "<hr/>";
echo "foreach ::::.<br/>";
foreach ($cars as $value)  {
    echo $value ."<br/>";
}

echo "<hr/>";
echo "for.<br/>";
$len = count($cars);
for ($i = 0; $i < $len; $i++) {
    echo $cars[$i]."<br/>";
}
$grades = array("第一周","第二周","第三周","第四周","第五周","第六周","第七周","第八周","第九周","第十周","第十一周","第十二周",);

?>

<form>
    <select name="grade">
        <?php foreach($grades as $value) :?>
        <option value="<?php echo $value; ?>"><?php echo $value; ?></option>
        <?php endforeach; ?>

    </select>
    
</form>
        


